package com.nongtai.pojo.vo;

import com.nongtai.pojo.entity.Brand;
import com.nongtai.pojo.entity.Sku;
import com.nongtai.pojo.entity.Spec;
import com.nongtai.pojo.entity.UserAddress;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 商品详情vo
 * @author yza
 * @version 1.0
 * @date 2024/7/5 15:42
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
public class GoodsDetailsVo implements Serializable {
    private Long id;
    private String name;
    private String spuCode;
    private String description;
    private BigDecimal price;
    private BigDecimal oldPrice; // 原价
    private BigDecimal discount; // 折扣
    private Integer inventory; // 库存
    private Brand brand;
    private Integer salesCount; // 销量
    private Integer commentCount; // 评价数量
    private Integer collectCount; // 收藏数量
    private List<String> mainVideos; // 主图视频集合
    private Integer videoScale; // 主图视频比例,1为1:1/16:9，2为3:4
    private List<String> mainPictures;// 主图图片集合

    // 可选规格集合
    private List<Spec> specs;

    // SKU集合
    private List<Sku> skus;

    // 所属分类
    private List<GoodsCategoryVo> categories;

    // 商品详情
    private Details details;

    // 是否为预售商品
    private Boolean isPreSale;

    // 用户地址列表
    private List<UserAddress> userAddresses;

    // 同类商品
    private List<GoodsVo> similarProducts;

    // 24小时热销
    private List<GoodsVo> hotByDay;

    // 商品详情内部类
    @Data
    public static class Details {
        private List<Property> properties;
        private List<String> pictures;

        @Data
        public static class Property {
            private String name;
            private String value;
        }
    }


}

